package com.bit.aop.proxy;

public class HouseProxy implements HouseSubject{
    private HouseSubject subject;

    public HouseProxy(HouseSubject subject) {
        this.subject = subject;
    }

    @Override
    public void saleHouse() {
        System.out.println("我是中介, 开始代理");
        subject.saleHouse();
        System.out.println("我是中介, 结束代理");
    }

    @Override
    public void rentHouse() {
        System.out.println("我是中介, 开始代理");
        subject.rentHouse();
        System.out.println("我是中介, 结束代理");
    }
}
